all?

 

all? agentset [ reporter ]

Similar to any?, all? checks if all agents of a given agentset reports true for a given reporter, where reporter is a true-or-false condition. For example, all? turtles [ size > 1] would return True if and only if every turtle in the model had a size greater than one. All? reports as False if a single agent reports False for the true-or-false condition.

 

Try it Yourself

 
 
 
 
 
 
 

What's next?

Once you mastered the all? primitive, don't stop there. Check out the resources below to improve your NetLogo skills.

 
Published NetLogo models that use the all? primitive:
 
 
Similar primitives:
nobody

Indicates that an agent does not exist.

Read more
count

Count the number of agents in an agentset.

Read more
 
Learn another primitive